package cool.mtc.minghe.data.model.sys.org.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import cool.mtc.web.annotation.dict.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yz
 */
@Schema(description = "列表信息")
@Data
public class OrgListDTO implements OrgTreeSupport {

    private Long orgId;
    private Long orgParentId;

    @JsonIgnore
    @Schema(description = "级别，子级  =  父级 + 1")
    private int level;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "排序")
    private Integer orderIndex;

    @Schema(description = "类型")
    @Dict
    private Long typeId;

    @Schema(description = "是否是虚拟的")
    private Boolean virtual;

    @Schema(description = "是否系统预设数据")
    private Boolean preset;

    private List<OrgListDTO> children = new ArrayList<>();
}
